# -*- coding:UTF-8 -*-
def mergeSortedArray(self, A, m, B, n):
    # write your code here
    index=m+n-1
    i=m-1
    j=n-1
    while i>=0 and j>=0:
        if A[i]>B[j]:
            A[index]=A[i]
            index-=1
            i-=1
        else:
            A[index]=B[j]
            index-=1
            j-=1
    while i>=0:
        A[index]=A[i]
        index-=1
        i-=1
    while j>=0:
        A[index]=B[j]
        index-=1
        j-=1

print mergeSortedArray("",[1,2,4,None,None],3,[3,5],2)
    
